import java.sql.Connection;
import java.sql.DriverManager;

import org.apache.torque.Torque;
import org.apache.torque.TorqueException;

public class StartApplication {
	/**
	 * @param args
	 * @throws Exception 
	 */
	
	public final static String TORQUE_PROPS = new String(
			"torque-3.3//Torque.properties");
	
	public StartApplication() throws Exception {
		// Creation de l'instance du controleur
		Controleur controleur = new Controleur();
		// création affichage de la fenêtre principale
		// controleur.restaure();
	}
	
	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		try {
            Class.forName("org.postgresql.Driver");
        }
        catch (Exception E) {
            System.err.println("Impossible de Charger le driver.");
        }
		try {
			/*
			 * Initializing Torque
			 */
			Torque.init(TORQUE_PROPS);
			Connection conn = DriverManager.getConnection("jdbc:postgresql://postgres-info/base5a05", "user5a05", "p05");
		}
		catch (TorqueException e) {
			e.printStackTrace();
		}
		new StartApplication();	
	}
}